home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Re: PLEASE Help! :(
- Date: Thu, 14 Mar 96 20:50:53 GMT
- Organization: none
- Message-ID: <826836653snz@genesis.demon.co.uk>
- References: <4hsqk2$4d7@deadbird.db.erau.edu> <Do9GMv.BKF@iquest.net>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <Do9GMv.BKF@iquest.net> dlmiller@iquest.net "Doug Miller" writes:
-
- >This sscanf statement contains most of your problems:
- >
- >+sscanf(inbuff,"%d %s %s %4.2f", &IntArr[index],&WordsArr1[index],
- >&WordsArr2[index],&FloatArr[index]);
- >
- >1) by including spaces in your format specifiers, you have instructed the
- > program to *demand*
- >at least one space between each field, and it *will* fail if there isn't.
-
- No true. White-space in a *scanf() format specifier cause while-space
- in the input stream/string to be skipped over. If the first character it
- encounters is a non-white-space character it does nothing. It can't cause
- the conversion to fail.
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-